<?php

namespace App\Admin\Controllers;

use Encore\Admin\Layout\Content;
use App\Http\Controllers\Controller;
use App\Admin\Extensions\DashboardList;
use App\Admin\Extensions\DashboardBoxes;
use App\Admin\Extensions\DashboardCharts;
use Encore\Admin\Facades\Admin;

class DashboardController extends Controller
{
    public function index(Content $content)
    {

        $roleId = Admin::user()->isAdministrator();
        if($roleId){

            return $content
                ->title('Littleshop Dashboard')
                ->description('Dream in future and believe in future...')
                ->row(app(DashboardCharts::class)->countCharts());
        }else{

           return $content
                ->title('Littleshop Dashboard')
                ->description('Dream in future and believe in future...')
                ->row(app(DashboardCharts::class)->countCharts());
        }
      
    }
}
